package com.syni.mdd.yhd.common.all.controller.protect.groupBuy.v2;

import com.syni.mdd.sjb.common.component.utils.common.annotations.CheckParams;
import com.syni.mdd.yhd.common.all.service.BmsDxGroupBuyService;
import com.syni.mdd.sjb.common.component.utils.common.utils.ParamsMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @className 团购
 * @description TOO
 * @Author cfx
 * @DATE 2019/7/24 16:50
 * @VERSION 1.0
 **/
@RestController
@RequestMapping("/v2/dxGroupBuy")
public class BmsDxGroupBuyController_V2 {

    @Autowired
    BmsDxGroupBuyService bmsDxGroupBuyService;

    @PostMapping("/getGroupBuyPreferential")
    @CheckParams
    public Map<String,Object> getGroupBuyPreferential(@RequestBody ParamsMap paramsMap) {
        return bmsDxGroupBuyService.getGroupBuyPreferential_V2(paramsMap);
    }

    /** 
     * @Description: 限时团购
     * @Author: cfx 
     * @Date: 2019/11/13 
     */
    @PostMapping("/getLimitBuyGroupBuy")
    @CheckParams
    public Map<String,Object> getLimitBuyGroupBuy(@RequestBody ParamsMap paramsMap) {
        return bmsDxGroupBuyService.getLimitBuyGroupBuy_V2(paramsMap);
    }

}
